package main

import (
	"github.com/gin-gonic/gin"
	"sweeter.star/go-demo/controller"
	"sweeter.star/go-demo/middleware"
)


func router(r *gin.Engine) *gin.Engine {
	r.POST("/api/auth/register", controller.Register)
	r.POST("/api/auth/login", controller.Login)
	r.GET("/api/auth/user", middleware.AuthMiddleware(), controller.User)
	return r;
}